﻿#region 引用

using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Mojito.Data.Initialization;
using Sohobloo.SoCommon.Log;
using Sohobloo.SoMcCoffee.Mef;

#endregion

namespace Mojito.WebSite
{
    public class WebApiApplication : HttpApplication
    {
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            MefWebConfig.RegisterSolver();
            LogInitializer.Initialize();
            DbInitializer.Initialize(DbInitializer.DbInitializMode.DropCreateOnChange);
        }
    }
}
